#include "gtest/gtest.h"

#include "stream/impl/rocksdb/Topic.h"

using Topic=stream::impl::rocksdb::Topic;
TEST(TopicTest, testMain){
	Topic topic("hello", ".") ;
	ASSERT_TRUE(topic.open()); //Meta open &  Data open;

	topic.size();

	const std::string key = "hello";
	const std::string value = "world";
	ASSERT_EQ((int)value.size(), topic.append(key, value));

	std::string out;
	ASSERT_TRUE(topic.get(key, out));

	topic.close(); //Data close & Meta close
}
